package com.ideaction.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.ideaction.consts.ReturnKeyConst;
import com.ideaction.globalconst.Result;
import com.ideaction.req.PlayerCommonReqBody;

/**
 * 客户端向服务器请求一个时间戳
 */
@RestController
public class SystemTimerController {
    
    @PostMapping("/GetServerTimeStamp")
    public String savePlayer(@RequestBody PlayerCommonReqBody playerCommonReqBody) {
        Result r = Result.build();
        r.put(ReturnKeyConst.TIME_STAMP, System.currentTimeMillis() / 1000);
        return r.response();
    }
}
